# -*- coding:UTF-8 -*-

from src.scrapy.seleniumzt import SelenuimZt


class ScrapyData(SelenuimZt):
    def __init__(self, url, user, pwd, product, project, opt, all):
        SelenuimZt.__init__(self, url, user, pwd, product, project, opt, all)

    def scrapy_task(self):
        """
        获取爬虫数据
        :return:返回最大行数（int），数据列表
        """
        mrow, taskdata = self.enter_project()
        return mrow, taskdata

    def scrapy_story(self):
        mrow, stroydata = self.get_story()
        return mrow, stroydata

    def scrapy_bug(self):
        mrow, bugdata = self.get_bug()
        return mrow, bugdata

    def scrapy_data(self):
        mrow, dictvalue = self.user_site_data()
        return mrow, dictvalue